const context = {};

function delegateGetter(target, property) {
  context.__defineGetter__(property, function () {
    return this[target][property];
  });
}
function delegateSetter(target, property) {
  context.__defineSetter__(property, function (val) {
    this[target][property] = val;
  });
}

// ...  可以优化，
delegateGetter("request", "query");
delegateGetter("request", "path");
delegateGetter("response", "body");
delegateSetter("response", "body");

// Object.defineProperty(context, "path", {
//   get() {
//     return this.request.path;
//   },
// });

export default context;
